package com.manong.mapper;

import com.manong.domain.Employee;
import com.manong.query.QueryObject;
import com.manong.vo.EmployeeRoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("employeeId") Long employeeId,@Param("roleId") Long roleId);

    void deleteRelation(Long id);

    int updateState(Long id, Boolean isAdmin);

    void insertBatchRelation(@Param("employeeId") Long employeeId, @Param("roleIds") Long[] roleIds);

    Employee login(@Param("username") String username, @Param("password") String password);
}
